package be.rhok.eenzaamheidswijzer.dto;

import be.rhok.eenzaamheidswijzer.model.Question;

import java.util.ArrayList;
import java.util.List;

public class QuestionDto {

    private long id;
    private String value;
    private List<AnswerDto> answers;

    public QuestionDto() {
    }

    public QuestionDto(Question question) {
        this.id = question.getId();
        this.value = question.getDutchValue();
        this.answers = new ArrayList<AnswerDto>();
        for (int i = 0; i < question.getAnswers().size(); i++) {
            answers.add(new AnswerDto(question.getAnswers().get(i)));
        }
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public List<AnswerDto> getAnswers() {
        return answers;
    }

    public void setAnswers(List<AnswerDto> answers) {
        this.answers = answers;
    }
}